package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.HotelDetail;
import cn.wolfcode.trip.base.domain.HotelLike;
import cn.wolfcode.trip.base.mapper.HotelContentMapper;
import cn.wolfcode.trip.base.mapper.HotelDetailMapper;
import cn.wolfcode.trip.base.mapper.HotelLikeMapper;
import cn.wolfcode.trip.base.service.IHotelDetailService;
import cn.wolfcode.trip.base.service.IHotelLikeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HotelLikeServiceImpl implements IHotelLikeService {
    @Autowired
    private HotelLikeMapper hotelLikeMapper;

    //查询是否有点赞记录
    @Override
    public HotelLike getLikeRecord(HotelLike hotelLike) {
        return hotelLikeMapper.selectLikeRecord(hotelLike);
    }

    //删除点赞记录
    @Override
    public void deleteRecord(Long id) {
        hotelLikeMapper.deleteByPrimaryKey(id);
    }
    //保存点赞记录
    @Override
    public void insertRecord(HotelLike hotelLike) {
        hotelLikeMapper.insert(hotelLike);
    }

}
